package creation_patterns.builder_pattern.concrete_builder;

import creation_patterns.builder_pattern.abstract_builder.Builder;
import creation_patterns.builder_pattern.product.computer.Computer;
import creation_patterns.builder_pattern.product.computer.hp.HpCPU;
import creation_patterns.builder_pattern.product.computer.hp.HpDisPlayer;
import creation_patterns.builder_pattern.product.computer.hp.HpMainBoard;

public class HpBuilder extends Builder {
    private Computer computer = new Computer();

    @Override
    public Builder buildCPU() {
        computer.setCpu(new HpCPU());
        return this;
    }

    @Override
    public Builder buildMainBoard() {
        computer.setMainBoard(new HpMainBoard());
        return this;
    }

    @Override
    public Builder buildDisplay() {
        computer.setDisPlayer(new HpDisPlayer());
        return this;
    }

    @Override
    public Computer builder() {
        return computer;
    }
}
